import {combineReducers, applyMiddleware,createStore} from 'redux'
import thunk from 'redux-thunk';
import { composeWithDevTools } from "@redux-devtools/extension"
import login from './modules/login'
import register from './modules/register'
import home from './modules/home'
import cate from './modules/cate'
import detail from './modules/detail'
import shop from './modules/shop'
import coupon from './modules/coupon'
import mine from './modules/mine'

// 模块
const reducer=combineReducers({
    login,
    register,
    home,
    cate,
    detail,
    shop,
    coupon,
    mine
})

// 创建仓库
const store=createStore(reducer,composeWithDevTools(applyMiddleware(thunk)));

// 导出仓库
export default store;